<%@ page language="java" import="java.util.*" pageEncoding="UTF-8"%>
<%@ taglib uri="/struts-tags"  prefix="s"%>
<%@ taglib uri="http://java.sun.com/jsp/jstl/functions"  prefix="fn"%>
<%
String path = request.getContextPath();
String basePath = request.getScheme()+"://"+request.getServerName()+":"+request.getServerPort()+path+"/";
%>

<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN">
<html>
  <head>
    <base href="<%=basePath%>">
    
    <title>短消息查询</title>
    
	<meta http-equiv="pragma" content="no-cache">
	<meta http-equiv="cache-control" content="no-cache">
	<meta http-equiv="expires" content="0">    
	<meta http-equiv="keywords" content="keyword1,keyword2,keyword3">
	<meta http-equiv="description" content="This is my page">
	<!--
	<link rel="stylesheet" type="text/css" href="styles.css">
	-->
    <SCRIPT type="text/javascript" src="<%=basePath%>javaScripts/jquery-1.5.1.min.js"></SCRIPT>
	<link rel="stylesheet" type="text/css" href="<%=basePath%>styles/friends_style.css" />
	   <link rel="stylesheet" type="text/css"
			href="<%=basePath%>styles/tr_style.css"/>
			 <script type="text/javascript" src="<%=basePath%>javaScripts/tr_toggle.js"></script>
			 <script type="text/javascript">
			   function trunBackMsg(){
			    parent.location.href="<%=basePath%>bbs/msg_queryInbox?senderId=${sessionScope.userDto.id}";
			   }
			   function delMsg(userId,msgId){
			   
			        parent.location.href="<%=basePath%>"+"bbs/msg_delMsg?senderId="+userId+"&id="+msgId;
			   }
			   function queryMsgById(msgId){
			     window.location="<%=basePath%>"+"bbs/msg_queryMsgById?id="+msgId;
			   }
			 </script>
  </head>
  
  <body style="padding: 0px 0px 0px 0px;margin-top: 0px;">
     <div class="fd_sc">
				<div class="fd_sc_tip">
					<table width="100%" cellpadding="0" cellspacing="0" border="0">
						<tr>
							<td align="left" class="tb_left" valign="middle">
								 <s:property value="#session.msgTitle"/>
							</td>
							<td align="right" class="tb_right" valign="middle">
								 &nbsp;
							</td>
						</tr>
					</table>
				</div>
				 <div class="fd_sc_header">
					<table width="100%" cellpadding="0" cellspacing="0" border="0">
						<tr>
						   <td width="10%" valign="middle" align="center">
								编&nbsp;&nbsp;号
							</td>
							<td width="25%" valign="middle" align="center">
								标&nbsp;&nbsp;题
							</td>
							<td width="15%" valign="middle" align="center">
								收&nbsp;件&nbsp;人
							</td>
							<td width="25%" valign="middle" align="center">
								时&nbsp;&nbsp;间
							</td>
							 
							<td width="25%" valign="middle" align="center">
								操&nbsp;&nbsp;作
							</td>
						</tr>
					</table>
				</div>
		         <s:if test="#session.msgList!=null">
		         
					<div style="text-align: center;">
						
						  <table border="0" cellpadding="0" cellspacing="0" width="100%"
						align="center" class="tb_msg_">
						<s:iterator value="#session.msgList" var="msg" status="count">
					 
						<tr >
							<td width="10%" align="center">
							    <s:property value="#count.index+1"/>
							</td>
							<td width="25%" align="center">
							   <s:property value="#msg.title"/>
								 
							</td>
							<td width="15%" align="center">
						          <s:property value="#msg.reviceName"/>
							</td>
							<td width="25%" align="center">
							    
							  <s:property value="#msg.sendTime"/>
							 </td>
							<td width="25%" valign="middle" align="center">
								  <a href="javaScript:queryMsgById('<s:property value="#msg.id"/>')">查看</a>&nbsp;&nbsp;<a href="javaScript:delMsg('${sessionScope.userDto.id}',' <s:property value="#msg.id"/>')">删除</a>
							</td>
						</tr>
						 
						</s:iterator> 
					       
					</table>
					    
						
					</div>
				</s:if>
				<s:else>
					<div
						style="text-align: left; padding-left: 20px; padding-top: 4px;line-height: 28px;padding-bottom: 10px;">
						 暂无短消息,列表为空 &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;
						 <input type="button"  value="还回收件箱"   style="background-color: #fafbc2;color: #367115;padding-top: 4px;padding-bottom: 2px;" onclick="javaScript:trunBackMsg()"/>
					</div>
				</s:else>
			</div>
          </div>
			</div>
			 
		 
  </body>
</html>
